/**
 * 
 */
package org.mspring.crm.client.remote;

import org.mspring.crm.client.model.UserModel;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

/**
 * @author Gao Youbo
 * @since 2012-3-7
 * 
 */
@RemoteServiceRelativePath("remote/userRemote")
public interface UserRemote extends RemoteService {
    public static class Util {
        private static UserRemoteAsync instance;

        public static UserRemoteAsync getInstance() {
            if (instance == null) {
                instance = (UserRemoteAsync) GWT.create(UserRemote.class);
                ServiceDefTarget target = (ServiceDefTarget) instance;
                target.setServiceEntryPoint("/remote/" + "userRemote");
            }
            return instance;
        }
    }
    
    public UserModel validateUser(String username, String password);
}
